import request from '@/api/request'

// 获取限时活动
export function requestActiveList() {
  return request({
    method: 'get',
    url: `/lejuAdmin/homeRecommend/findAllRecommends`
  })
}

// 删除限时活动
export function deleteActive(id) {
  return request({
    method: 'delete',
    url: `/lejuAdmin/homeRecommend/delRecommend/${id}`
  })
}

// 新增活动
export function addRecommend(data) {
  return request({
    method: 'post',
    url: `/lejuAdmin/homeRecommend/addRecommend`,
    data
  })
}

// 获取限时活动
export function requestAdvertiseList() {
  return request({
    method: 'get',
    url: `/lejuAdmin/advertise/adsList`
  })
}

// 新增广告
export function addAdvertise(data) {
  return request({
    method: 'post',
    url: `/lejuAdmin/advertise/addAds`,
    data
  })
}

// 删除广告
export function deleteAdvertise(id) {
  return request({
    method: 'delete',
    url: `/lejuAdmin/advertise/delAds/${id}`
  })
}

// 修改广告
export function changeAdvertise(data) {
  return request({
    method: 'post',
    url: `/lejuAdmin/advertise/updateAds`,
    data
  })
}
